package com.example.bookstore.entity;

import lombok.Data;
import org.crazycake.shiro.AuthCachePrincipal;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;

@Data
public class BookUser implements Serializable, AuthCachePrincipal {
    private Integer userId;

    private String userName;

    private String password;

    private String gender;

    private String email;

    private String telephone;

    //用户简介
    private String introduce;

    //注册激活码
    private String activityCode;

    // 1表示激活 0未激活
    private Integer state;

    //普通用户1 超级用户2
    private Integer userRole;

    private Date registTime;

    private Set<String> perms;

    /**
     * 可以指定进入redis的key
     * @return
     */
    @Override
    public String getAuthCacheKey() {
        return null;
    }


    public Integer getuserId() {
        return userId;
    }

    public void setuserId(Integer userId) {
        this.userId = userId;
    }

    public String getuserName() {
        return userName;
    }

    public void setuserName(String userName) {
        this.userName = userName == null ? null : userName.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender == null ? null : gender.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone == null ? null : telephone.trim();
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce == null ? null : introduce.trim();
    }

    public String getactivityCode() {
        return activityCode;
    }

    public void setactivityCode(String activityCode) {
        this.activityCode = activityCode == null ? null : activityCode.trim();
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Integer getuserRole() {
        return userRole;
    }

    public void setuserRole(Integer userRole) {
        this.userRole = userRole;
    }

    public Date getregistTime() {
        return registTime;
    }

    public void setregistTime(Date registTime) {
        this.registTime = registTime;
    }
}